#!/bin/sh
# Usage:
# bash ssh-copy-id.sh [IPFILE]

[ $# -gt 0 -a -f "$1" ] || exit 1

cat $1 | while read ip; do
    user='mcloud'
    password='mcloud'
    expect ./ssh-copy-id.exp $ip $user $password
done
